//必须带ssq文件方可使用

ssq.province.push({"name":"台湾","city":[{"name":"台北市"},{"name":"新北市"},{"name":"桃园市"},{"name":"台中市"},{"name":"台南市"},{"name":"高雄市"},{"name":"基隆市"},{"name":"新竹市"},{"name":"嘉义市"},{"name":"宜兰县"},{"name":"新竹县"},{"name":"苗栗县"},{"name":"彰化县"},{"name":"南投县"},{"name":"云林县"},{"name":"嘉义县"},{"name":"屏东县"},{"name":"花莲县"},{"name":"台东县"},{"name":"澎湖县"},{"name":"金门县"},{"name":"连江县"}]})
ssq.province.push({"name":"香港特别行政区"})
ssq.province.push({"name":"澳门特别行政区"})

ssq.getVersion=function(){
    return ssq.date;
}

ssq.getProvince=function(){
    var provinces=[];
    for(var i=0;i<ssq.province.length;i++){
        provinces.push(ssq.province[i].name);
    }
    return provinces;
}

ssq.getCity=function(prov){
    var city=[];
    for(var i=0;i<ssq.province.length;i++){
        if(ssq.province[i].name==prov){
            if(typeof ssq.province[i].city!="undefined"){
                city=ssq.province[i].city;
                break;
            }
        }
    }
    return city;
}

ssq.getArea=function(prov,city){
    var area=[];
    for(var i=0;i<ssq.province.length;i++){
        if(ssq.province[i].name==prov){
            if(typeof ssq.province[i].city=="undefined"){
                break;
            }
            var citys=ssq.province[i].city;
            for(var j=0;j<citys.length;j++){
                if(citys[j].name==city){
                    if(typeof citys[j].area){
                        area=citys[j].area;
                        break;
                    }
                }
            }
        }
    }
    return area;
}